import request from '@/sheep/request';

// 轮胎存单明细 VO
export interface DepositRecordsDetailVO {
  tireDepositRecordsId: number // 轮胎存单ID
  tireSeason: string // 季节胎型
  tireBrand: string // 轮胎品牌
  tireModel: string // 轮胎型号
  storageQuantity: number // 存储轮胎数量
  remainingQuantity: number // 剩余轮胎数量
  id: number // 存胎明细ID，主键
}

// 轮胎存单明细 API
export const DepositRecordsDetailApi = {
  // 查询轮胎存单明细分页
  getDepositRecordsDetailPage: async (data: any) => {
    return await request({ url: `/tire/deposit-records-detail/page`,method: 'GET', data })
  },

  // 查询轮胎存单明细详情
  getDepositRecordsDetail: async (id: number) => {
    return await request({ url: `/tire/deposit-records-detail/get?id=` + id ,method: 'GET'})
  },

  // 新增轮胎存单明细
  createDepositRecordsDetail: async (data: DepositRecordsDetailVO) => {
    return await request({ url: `/tire/deposit-records-detail/create`, data,method: 'POST' })
  },

  // 修改轮胎存单明细
  updateDepositRecordsDetail: async (data: DepositRecordsDetailVO) => {
    return await request({ url: `/tire/deposit-records-detail/update`,method: 'PUT', data })
  },

  // 删除轮胎存单明细
  deleteDepositRecordsDetail: async (id: number) => {
    return await request({ url: `/tire/deposit-records-detail/delete?id=` + id,method: 'DELETE' })
  },
}
